<template>
  <div class="container">
    <TopNav title="工作台"/>
    <h1>临床营养管理</h1>
    <GridList :list="gridList1"/>
    <h1>营养仓库管理</h1>
    <GridList :list="gridList2"/>
    <h1>营养财务管理</h1>
    <GridList :list="gridList3"/>
    <h1>营养查房</h1>
    <GridList :list="gridList4"/>
    <h1>营养订餐</h1>
    <GridList :list="gridList5"/>
    <h1>ERAS营养支持</h1>
    <GridList :list="gridList6"/>
    <h1>慢性病营养支持</h1>
    <GridList :list="gridList7"/>
    <h1>移动营养诊疗</h1>
    <GridList :list="gridList8"/>
    <h1>营养产品风险评估及质量控制</h1>
    <GridList :list="gridList9"/>
  </div>
</template>
<script setup>
import {onMounted, reactive} from "vue";
import {useRouter} from 'vue-router'
import {useDataStore} from "@/stores/dataStore"
import TopNav from "@/components/TopNav/Index.vue"
import AdvList from "@/components/List/AdvList/Index.vue"
import GridList from "@/components/List/GridList/Index.vue"

const dataStore = useDataStore()

const router = useRouter()
//宫格列表
const gridList1 = reactive([
  {
    icon: '',
    name: '患者登记',
    url: '/patient/add'
  },
  {
    icon: '',
    name: '患者管理',
    url: '/patient/index'
  },
  {
    icon: '',
    name: '风险筛查',
    url: '/assessment/riskAssessment'
  },
  {
    icon: '',
    name: '制定计划',
    url: '/plan/index'
  },
])
const gridList2 = reactive([
  {
    icon: '',
    name: '库存管理',
    url: '/repository/product'
  },
  {
    icon: '',
    name: '过期管理',
    url: '/repository/expiryTime'
  },
  {
    icon: '',
    name: '产品追溯',
    url: '/repository/record'
  },
])
const gridList3 = reactive([
  {
    icon: '',
    name: '费用管理',
    url: '/cost/cost'
  },
  {
    icon: '',
    name: '财务报表',
    url: '/cost/sheet'
  },
  {
    icon: '',
    name: '预算控制',
    url: '/cost/budget'
  },
])
const gridList4 = reactive([
  {
    icon: '',
    name: '营养查房',
    url: '/patient/wardRoundRecord'
  },
])
const gridList5 = reactive([
  {
    icon: '',
    name: '餐品一览',
    url: '/meal/meal'
  },
  {
    icon: '',
    name: '营养订餐',
    url: '/meal/book'
  },
  {
    icon: '',
    name: '订餐记录',
    url: '/meal/record'
  },
])
const gridList6 = reactive([
  {
    icon: '',
    name: '术前评估',
    url: '/eras/pre'
  },
  {
    icon: '',
    name: '术后支持',
    url: '/eras/after'
  },
  {
    icon: '',
    name: '数据反馈',
    url: '/eras/feedBack'
  },
])
const gridList7 = reactive([
  {
    icon: '',
    name: '慢性病患者',
    url: '/slow_patient/patient'
  },
  {
    icon: '',
    name: '饮食指导',
    url: '/slow_patient/food'
  },
  {
    icon: '',
    name: '健康教育',
    url: '/slow_patient/learn'
  },
])
const gridList8 = reactive([
  {
    icon: "",
    name: '健康监测',
    url: '/mobile/healthMonitoring'
  },
  {
    icon: "",
    name: '实时沟通',
    url: '/mobile/communication'
  },
  {
    icon: "",
    name: '数据记录',
    url: '/mobile/record'
  },
])
const gridList9 = reactive([
  {
    icon: '',
    name: '风险评估',
    url: '/product/assessment'
  },
  {
    icon: '',
    name: '质量监控',
    url: '/product/control'
  },
  {
    icon: '',
    name: '不良报告',
    url: '/product/report'
  },
])
//广告列表
const advList = reactive([
  {
    img: 'https://img2.baidu.com/it/u=3430536694,2528470028&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=706',
  },
])
onMounted(() => {
  handleSecurity()
})
const handleSecurity = () => {
  if (!dataStore.isLogin) {
    ElMessage.error('请先登录')
    router.push("/home/login")
  }
}
</script>
<style scoped lang="scss">
.container{
  padding-bottom: 50px;
}
h1{
  margin-top: 1px;
  padding-left: 20px;
  padding-top: 10px;
  background-color:#ffffff;
  font-size: 17px;
  font-weight: bolder;
  font-family: 楷体;
}
</style>
